/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package org.sbbs.demo.entity.enumtype;

import jakarta.persistence.AttributeConverter;
import jakarta.persistence.Converter;
import java.util.BitSet;

/**
 *
 * @author jenkins
 */
@Converter(autoApply = true)
public class BitSetConverter implements AttributeConverter<BitSet, String> {

    @Override
    public String convertToDatabaseColumn(BitSet attribute) {
        return "";
//        return BitSetHelper.bitSetToString(attribute);
    }

    @Override
    public BitSet convertToEntityAttribute(String dbData) {
        return new BitSet();
//        return BitSetHelper.stringToBitSet(dbData);
    }
}
